package com.qf.boot1.config;

import com.qf.boot1.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zed
 * @date 2022/5/18 10:52
 * SpringBoot的配置类[@Configuration]
 */
@Configuration
public class MyConfig {

    // 方法名就是bean的id,返回值就是生产的bean
    @Bean
    public User user() {
        User user = new User();
        user.setId(1);
        user.setName("徐静敏");
        return user;
    }

}
